﻿using BCEntity.OA.BusinessFlowPushRecord;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.BusinessFlowPushRecord
{
    /// <summary>
    /// OA系统业务流推进记录
    /// </summary>
	public interface IBusinessFlowPushRecordData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="businessFlowPushRecordId">OA系统业务流推进记录Id</param>
        Task<bool> Exists(long businessFlowPushRecordId);
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="businessFlowModelCode">业务流模型编码</param>
        /// <param name="referenceNo">引用编号</param>
        Task<bool> Exists(string businessFlowModelCode,string referenceNo);
        /// <summary>
        /// 增加OA系统业务流推进记录
        /// </summary>
        /// <param name="entity">OA系统业务流推进记录信息</param>
        Task<BusinessFlowPushRecordEntity> Add(BusinessFlowPushRecordEntity entity);
        /// <summary>
        /// 更新OA系统业务流推进记录
        /// </summary>
        /// <param name="entity">OA系统业务流推进记录信息</param>
        Task<BusinessFlowPushRecordEntity> Update(BusinessFlowPushRecordEntity entity);
        /// <summary>
        /// 删除OA系统业务流推进记录
        /// </summary>
        /// <param name="businessFlowPushRecordId">OA系统业务流推进记录Id</param>
        Task<bool> Delete(long businessFlowPushRecordId);
        /// <summary>
        /// 获取OA系统业务流推进记录
        /// </summary>
        /// <param name="businessFlowPushRecordId">OA系统业务流推进记录Id</param>
        Task<BusinessFlowPushRecordEntity> GetEntity(long businessFlowPushRecordId);
        /// <summary>
        /// 获取OA系统业务流推进记录
        /// </summary>
        /// <param name="businessFlowModelCode">业务流模型编码</param>
        /// <param name="referenceNo">引用编号</param>
        Task<BusinessFlowPushRecordEntity> GetEntity(string businessFlowModelCode, string referenceNo);
        /// <summary>
        /// 获取OA系统业务流推进记录分页列表
        /// </summary>
        /// <param name="businessFlowModelCode">业务流模型编码</param>
        /// <param name="referenceNo">引用编号</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">OA系统业务流推进记录每页数据条数</param>
        Task<(IEnumerable<BusinessFlowPushRecordEntity>, int)> Query(string businessFlowModelCode, string referenceNo, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}
